import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Location } from 'utils/router';
import RootRouter from './router';
import * as actions from '../actions/index';
import RobotGuides from './robotGuides';
import { updateSetSelectedType } from 'pages/index/pages/project/pages/projectFiles/actions/common';
class Root extends Component {
  render() {
    return (
      <React.Fragment>
        <Location>
          {({ location }) => {
            return <RootRouter location={location} {...this.props} />;
          }}
        </Location>
        <RobotGuides {...this.props} />
      </React.Fragment>
    );
  }
}
export default connect(
  ({ root, ...others }) => ({ ...root, ...others }),
  (dispatch) => bindActionCreators({ ...actions, updateSetSelectedType }, dispatch),
)(Root);
